import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;

import java.util.Random;
import java.util.Scanner;
public class Test {
    public static void main(String[] args) {
        Scanner  scan = new Scanner(System .in );
        Random random =new Random();
        int randNum = random.nextInt(100);//[0,100)
        //int randNum = random.nextInt(100)+100;//[100,200)
        //int randNum = random.nextInt(50)+50;//[50,100)

        while(true){
            System.out.println("请输入你要猜的数字：");
            int num = scan.nextInt() ;
            if(num > randNum ){
                System.out.println("猜大了！");
            }else if(num == randNum ){
                System.out.println("猜对了！");
                break;
            }else{
                System.out.println("猜小了！");
            }
        }
    }



    public static void  main14(String[] args) {
        Scanner  scan = new Scanner(System .in );
        while(scan.hasNextInt()){
            int n = scan.nextInt();
            System.out.println("n= "+n);
        }
    }

    public static void main13(String[] args) {
        Scanner  scan = new Scanner(System .in );
        System.out.println("请输入姓名：");
        String name = scan.nextLine();
        String name2 = scan.next();
        System.out.println(name);
        System.out.println(name2);
    }


    public static void main12(String[] args) {
        Scanner  scan = new Scanner(System .in );
        System.out.println("请输入年龄：");
        int n = scan.nextInt();
        System.out.println(n);
        scan.nextLine();
        System.out.println("请输入姓名：");
        String name = scan.nextLine();
        System.out.println(name);
    }
    public static void main11(String[] args) {
        Scanner  scan = new Scanner(System .in );
        System.out.println("请输入姓名：");
        String name = scan.nextLine();
        System.out.println(name);
        System.out.println("请输入年龄：");
        int n = scan.nextInt();
        System.out.println(n);
        System.out.println("请输入工资");
        double c = scan.nextDouble();
        System.out.println(c);
        scan.close();

    }
    public static void main10(String[] args) {
        int num = 1;
        do {
            System.out.println(num);
            num++;
        } while (num <= 10);
    }


    public static void main9(String[] args) {
        int sum = 0;
        for (int i = 1; i <= 5; i++) {
            int tmp = 1;
            for (int j = 1; j <= i; j++) {
                tmp *= j;
            }
            sum += tmp;
        }
        System.out.println(sum);
    }
    public static void main7(String[] args) {
        int num = 1;
        for (int i = 1; i <= 5; i++) {
            num *=i;
        }
        System.out.println(num);
    }
    public static void main6(String[] args) {
        int num = 100;
        while(num <= 200){
            if(num % 3 != 0) {
               num++;
               continue;
            }
            System.out.println("找到了3的倍数为："+num);
            num++;
        }
    }


    public static void main5(String[] args) {
        int n = 1;
        int mun = 1;
        while(n <= 5){
            mun *= n;
            n++;
        }
        System.out.println(mun);
    }
    public static void main4(String[] args) {
        System.out.println((true == true) ? (true == true) ? false : true : false);
    }
    public static void main3(String[] args) {
        int a = 0x1;
        int b = 0x2;
        System.out.println(a^b);
    }
    public static void main2(String[] args) {
        int a = 10;
        int b = 20;
        System.out.println(a | b);
    }
    public static void main1(String[] args) {
       int a = 10;
       int b = 20;
        System.out.println(a & b);
    }
}
